'use strict';
var Model = require('../../../Base/server/controllers/Model');

var modelField = {};
modelField.Code = {
    type: String,
    Name: '编码',
    IsUnique: true,
    IsEmpty: false,
    trim: true
};
modelField.Name = {
    type: String,
    Name: '名称',
    IsEmpty: false,
    trim: true
};
//是否计时
modelField.IsTiming = {
    type: Boolean,
    default: false
};
//是否质检点
modelField.IsQCpoint = {
    type: Boolean,
    default: false
};
//是否入库点
modelField.IsStoragePoint = {
    type: Boolean,
    default: false
};
modelField.ErpId = {
    type: String,
    trim: true
};
modelField.Remark = {
    type: String,
    default:'',
    trim: true
};
//是否允许多次扫描
modelField.IsMultScan = {
    type: Boolean,
    default: false
};
modelField.IsEffective = {
    type: Boolean
};

var newModel = new Model(modelField);
newModel.addIndex({Code: 1});
newModel.addIndex({Name: 1});
newModel.create('Work', '作业');